import React from "react";
import {findAllByDisplayValue} from "@testing-library/react";

export function withHoc(Com){
    return function (){
        return (
            <Com a={1} b={2}/>
        )
    }
}


export function withHoc2(Com,a,b){
    return function (){
        return (
            <Com a={a} b={b}/>
        )
    }
}

export function withHoc3(a,b){
    function changeHandler(){

    }
    return function(Com){
        return ()=>(
            <Com changeHandler={changeHandler} a={a} b={b}/>
        )
    }
}
export function withHoc4(Com){
    return class extends Com{
        render(){
            if(this.state.isLoading){
                return (
                    <h3>正在拼命加载中</h3>
                )
            }
            return super.render();
        }
    }
}